#ifndef BOX_H
#define BOX_H

#include "AABB.h"
#include "Geometry.h"

class WBox: public Geometry {
public:
    vec3 min, max;

    WBox() {
        name = "Box";
    }

    Symbol parse(ifstream &file, Symbol curToken);
    bool intersect(Ray *r);
    vec3 getNormal(Ray *r);

    void print() {
        printf("Box:\n\tMin: %f %f %f\n\tMax: %f %f %f\n",
                min.x, min.y, min.z, max.x, max.y, max.z);

        Geometry::print();
    }

    AABB *generateAABB();

    int type() {
        return 2;
    }
};


#endif
